package com.feicheng.controller.wx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.feicheng.common.result.ResultInfo;
import com.feicheng.persistence.entity.Sample;
import com.feicheng.service.IFSampleService;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yuxiuwen
 * @since 2022-02-26
 */



@RestController("/wx/sample")
@RequestMapping("/wx/sample")
public class SampleContronller {
	
	@Autowired
	IFSampleService sampleService;
	
	//施工案例详情查询接口
		@GetMapping("/info")
		public ResultInfo getWxSampleInfo (Integer sampleId) {
			
			
			return sampleService.getSampleInfo(sampleId);
		}
		
		//用于施工案例分页查询与施工案例条件分页查询	
		@GetMapping("/page")
		public ResultInfo getWxSampleByPage(
				Sample sample,
				@RequestParam(defaultValue="1") Integer current, 
				@RequestParam(defaultValue="10")Integer size) {
			return sampleService.getSamplesByPage(sample,current,size);
		}
	

}
